package com.swjd.sell.utils;

import com.swjd.sell.vo.ResultVO;

import java.util.List;

/**
 * 对ResultVO逻辑封装
 * @author 刘涛
 * @create 2021/8/25 17:24
 */
public class ResultVOUtil {
    public static ResultVO success(Object object){
        ResultVO resultVO = new ResultVO();
        //填充resultVO数据
        resultVO.setCode(0);
        resultVO.setMsg("成功");
        //拼装productInfoVO和resultVO
        resultVO.setData(object);
        return resultVO;
    }
    public static ResultVO success(){
        return success(null);
    }
    public static ResultVO error(Integer code,String msg){
        ResultVO resultVO = new ResultVO();
        //填充resultVO数据
        resultVO.setCode(code);
        resultVO.setMsg(msg);
        return resultVO;
    }

}
